// pages/mine/store_admin//navadd.js
Page({

  data: {   name:'',yinhang:'',phone:'',type:''

  },

  onLoad: function (options) {

  },
   change1(e){
     this.setData({
       name:e.detail.value
     })
   },
   change2(e){
      this.setData({
        yinhang:e.detail.value
      })
   },
   change3(e){
     this.setData({
       phone:e.detail.value
     })
   },
   //根据卡号判断yin行卡类型
   gettype(){
       wx.request({
         url: 'https://zujieba.com/',
       })
   },
   //添加银行卡
   addbank(){
      wx.request({
        url: 'https://zujieba.com/Api/money/add_bank.html',
        data:{name:this.data.name,code:this.data.yinhang,phone:this.data.phone,uid:wx.getStorageSync('uid')},
        method:'POST',
        success:(res)=>{
          console.log(res);
          if(res.data.success==1){
           wx.navigateBack()
          }else{
            wx.showToast({
              title: res.data.tips,
              icon:'none'
            })
          }
          
        }
      })

   }
    
})